<?php

namespace app\popo\vo;

use app\popo\BaseVO;

/**
 * 订单详情VO
 */
class OrderVO extends BaseVO
{
    public int $id;
    public string $number;
    public int $status;
    public int $userId;
    public int $addressBookId;
    public string $orderTime;
    public string $checkoutTime;
    public int $payMethod;
    public int $payStatus;
    public float $amount;
    public string $remark;
    public string $phone;
    public string $address;
    public string $userName;
    public string $consignee;
    public string $cancelReason;
    public string $rejectionReason;
    public string $cancelTime;
    public string $estimatedDeliveryTime;
    public int $deliveryStatus;
    public string $deliveryTime;
    public float $packAmount;
    public int $tablewareNumber;
    public int $tablewareStatus;
    public array $orderDetailList = [];
    public string $orderDishes;

    // 所有getter和setter方法
    public function getId(): int
    {
        return $this->id;
    }

    public function setId(int $id): void
    {
        $this->id = $id;
    }

    public function getNumber(): string
    {
        return $this->number;
    }

    public function setNumber(string $number): void
    {
        $this->number = $number;
    }

    public function getStatus(): int
    {
        return $this->status;
    }

    public function setStatus(int $status): void
    {
        $this->status = $status;
    }

    public function getUserId(): int
    {
        return $this->userId;
    }

    public function setUserId(int $userId): void
    {
        $this->userId = $userId;
    }

    public function getAddressBookId(): int
    {
        return $this->addressBookId;
    }

    public function setAddressBookId(int $addressBookId): void
    {
        $this->addressBookId = $addressBookId;
    }

    public function getOrderTime(): string
    {
        return $this->orderTime;
    }

    public function setOrderTime(string $orderTime): void
    {
        $this->orderTime = $orderTime;
    }

    public function getCheckoutTime(): string
    {
        return $this->checkoutTime;
    }

    public function setCheckoutTime(string $checkoutTime): void
    {
        $this->checkoutTime = $checkoutTime;
    }

    public function getPayMethod(): int
    {
        return $this->payMethod;
    }

    public function setPayMethod(int $payMethod): void
    {
        $this->payMethod = $payMethod;
    }

    public function getPayStatus(): int
    {
        return $this->payStatus;
    }

    public function setPayStatus(int $payStatus): void
    {
        $this->payStatus = $payStatus;
    }

    public function getAmount(): float
    {
        return $this->amount;
    }

    public function setAmount(float $amount): void
    {
        $this->amount = $amount;
    }

    public function getRemark(): string
    {
        return $this->remark ?? '';
    }

    public function setRemark(string $remark): void
    {
        $this->remark = $remark;
    }

    public function getPhone(): string
    {
        return $this->phone;
    }

    public function setPhone(string $phone): void
    {
        $this->phone = $phone;
    }

    public function getAddress(): string
    {
        return $this->address;
    }

    public function setAddress(string $address): void
    {
        $this->address = $address;
    }

    public function getUserName(): string
    {
        return $this->userName;
    }

    public function setUserName(string $userName): void
    {
        $this->userName = $userName;
    }

    public function getConsignee(): string
    {
        return $this->consignee;
    }

    public function setConsignee(string $consignee): void
    {
        $this->consignee = $consignee;
    }

    public function getCancelReason(): string
    {
        return $this->cancelReason ?? '';
    }

    public function setCancelReason(string $cancelReason): void
    {
        $this->cancelReason = $cancelReason;
    }

    public function getRejectionReason(): string
    {
        return $this->rejectionReason ?? '';
    }

    public function setRejectionReason(string $rejectionReason): void
    {
        $this->rejectionReason = $rejectionReason;
    }

    public function getCancelTime(): string
    {
        return $this->cancelTime ?? '';
    }

    public function setCancelTime(string $cancelTime): void
    {
        $this->cancelTime = $cancelTime;
    }

    public function getEstimatedDeliveryTime(): string
    {
        return $this->estimatedDeliveryTime ?? '';
    }

    public function setEstimatedDeliveryTime(string $estimatedDeliveryTime): void
    {
        $this->estimatedDeliveryTime = $estimatedDeliveryTime;
    }

    public function getDeliveryStatus(): int
    {
        return $this->deliveryStatus;
    }

    public function setDeliveryStatus(int $deliveryStatus): void
    {
        $this->deliveryStatus = $deliveryStatus;
    }

    public function getDeliveryTime(): string
    {
        return $this->deliveryTime ?? '';
    }

    public function setDeliveryTime(string $deliveryTime): void
    {
        $this->deliveryTime = $deliveryTime;
    }

    public function getPackAmount(): float
    {
        return $this->packAmount;
    }

    public function setPackAmount(float $packAmount): void
    {
        $this->packAmount = $packAmount;
    }

    public function getTablewareNumber(): int
    {
        return $this->tablewareNumber;
    }

    public function setTablewareNumber(int $tablewareNumber): void
    {
        $this->tablewareNumber = $tablewareNumber;
    }

    public function getTablewareStatus(): int
    {
        return $this->tablewareStatus;
    }

    public function setTablewareStatus(int $tablewareStatus): void
    {
        $this->tablewareStatus = $tablewareStatus;
    }

    public function getOrderDetailList(): array
    {
        return $this->orderDetailList;
    }

    public function setOrderDetailList(array $orderDetailList): void
    {
        $this->orderDetailList = $orderDetailList;
    }

    public function getOrderDishes(): string
    {
        return $this->orderDishes ?? '';
    }

    public function setOrderDishes(string $orderDishes): void
    {
        $this->orderDishes = $orderDishes;
    }

    /**
     * 重写toArray方法，返回所有属性
     * @return array
     */
    public function toArray(): array
    {
        return [
            'id' => $this->id ?? 0,
            'number' => $this->number ?? '',
            'status' => $this->status ?? 0,
            'userId' => $this->userId ?? 0,
            'addressBookId' => $this->addressBookId ?? 0,
            'orderTime' => $this->orderTime ?? '',
            'checkoutTime' => $this->checkoutTime ?? '',
            'payMethod' => $this->payMethod ?? 0,
            'payStatus' => $this->payStatus ?? 0,
            'amount' => $this->amount ?? 0.0,
            'remark' => $this->remark ?? '',
            'phone' => $this->phone ?? '',
            'address' => $this->address ?? '',
            'userName' => $this->userName ?? '',
            'consignee' => $this->consignee ?? '',
            'cancelReason' => $this->cancelReason ?? '',
            'rejectionReason' => $this->rejectionReason ?? '',
            'cancelTime' => $this->cancelTime ?? '',
            'estimatedDeliveryTime' => $this->estimatedDeliveryTime ?? '',
            'deliveryStatus' => $this->deliveryStatus ?? 0,
            'deliveryTime' => $this->deliveryTime ?? '',
            'packAmount' => $this->packAmount ?? 0.0,
            'tablewareNumber' => $this->tablewareNumber ?? 0,
            'tablewareStatus' => $this->tablewareStatus ?? 0,
            'orderDetailList' => $this->orderDetailList ?? [],
            'orderDishes' => $this->orderDishes ?? ''
        ];
    }
}